Bayes Misclassification error and plot : pattern recognition [closed]

Posted by user1214586 on Programmers See other posts from Programmers or by user1214586
Published on 2012-04-01T01:37:27Z Indexed on 2012/04/01 5:38 UTC
Read the original article Hit count: 439

Filed under:
|

Below is a Matlab code for Bayes classifier which classifies arbitrary numbers into their classes.

 training = [3;5;17;19;24;27;31;38;45;48;52;56;66;69;73;78;84;88]; 
     target_class = [0;0;10;10;20;20;30;30;40;40;50;50;60;60;70;70;80;80];  

      test = [1:2:90]'; 
     class  = classify(test,training, target_class, 'diaglinear');  % Naive Bayes classifier 
 [test class]

If someone could provide code snippets for calculating the Bayes error for misclassification and accuracy.Also, is it possible to plot a scatter plot and histogram indicating the number of data points belonging to different classes? Thank you.

© Programmers or respective owner

Related posts about source-code

Related posts about classification